package cn.dlc.com.base.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author: dlc
 * @Date: 2021/8/4 - 17:40
 * 通用的接参数的类
 */
@Data
@ApiModel("通用请求参数")
public class BaseDTO {

    @ApiModelProperty(value = "排序字段，有多个通过 “,” 隔开", position = 1000)
    private String columns;

    @ApiModelProperty(value = "排序方式，有多个通过 “,” 隔开，和排序字段一一对应", position = 1001)
    private String descTypes;

    @ApiModelProperty(value = "分页开始页", position = 1002)
    private Integer pageNumber = 0;

    @ApiModelProperty(value = "每页显示数量", position = 1003)
    private Integer pageSize = 10;

    @ApiModelProperty(value = "创建人id", position = 1004)
    private String createdId;

    @ApiModelProperty(value = "创建人名称", position = 1005)
    private String createdName;

    @ApiModelProperty(value = "创建时间", position = 1006)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @ApiModelProperty(value = "数据状态", position = 1007)
    private Integer status;

}
